<?php

//echo br(3); ###########################################################################################

	$TEMP->set_file(array('handle' => DIR_IFRAME_VIEW . 'studCurrentSubjTaken.html'));
	
	$studID = _GET('id');
	$CID    = _GET('cid');
	$SLID   = _GET('slid');
	
	$strGrades = $DSC->gradeConvertion();
			
	$studentSubjectList = $STUD->getStudentSubjectTakenList($studID, $CID, $SLID);

	if ( !empty($studentSubjectList) ) {
		$count = 1;
		$TEMP->set_block('handle',  'subjects', 'subjectsRow');
		foreach($studentSubjectList as $studentSubjectListVal) {
			if (!empty($studentSubjectListVal['grade'])) {
				
				if ( in_array($studentSubjectListVal['grade'], $strGrades) )
					$percentSymbol = '';
				else
					$percentSymbol = '%';
			}
			else {
				$percentSymbol = '';
			}

			$TEMP->set_var(array('subject' 	=> $studentSubjectListVal['subj_desc'],
								 'grades' 	=> $studentSubjectListVal['grade'] . $percentSymbol,
								 'number' 	=> $count . '.&nbsp;&nbsp;'));
			$count++;
			$TEMP->parse('subjectsRow', 'subjects', true);
		}
	}
	else {
		$TEMP->set_var(array('subject' 	=> '',
							 'grades' 	=> '',
							 'number' 	=> '',));
	}
	
	##################### CHECKLIST HEADER #####################
?>